<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%layout("/WEB-INF/view/common/inc/admin_head.html",{title:'系统主页', styles:'bootstrap,animate,style,font-awesome,bootstrap-table'}){%>
    <style>

    </style>
    <%}%>
</head>

<body class="">
<div class="row">
    <div class="col-sm-3">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <span class="label label-success pull-right">总</span>
                <h5>当月绩效人数</h5>
            </div>
            <div class="ibox-content">
                <h4 class="no-margins" id="orderTotal">${performanceNumber}</h4>
                <div class="stat-percent font-bold text-success"></i>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-12">
        <!-- START 右侧数据 -->
        <div class="ibox float-e-margins" style="margin-bottom: 0px;">

            <!-- START 数据表格 -->
            <table id="relatedTable"
                   data-toolbar="#toolbar"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-resizable="true"
                   data-url="/sea/human/performance/dashboard/findStatusNumber.do"
                   data-page-size="15"
                   class="table table-striped table-hover"
            >
            </table>
            <!-- END 数据表格 -->
        </div>
    </div>
</div>
<%layout("/WEB-INF/view/common/inc/admin_js.html",{modules:'jquery,bootstrap,bootstrap-table,bootstrap-table-zh-CN,dtvalidate,dtvalidate-lang-zh_cn,laydate,layer,layui,chosen,chosen-demo,upload'}){}%>
<script>
    laydate.render({
        elem: '#beginDate' //指定元素
        ,trigger: 'click'
    });
    laydate.render({
        elem: '#endDate' //指定元素
        ,trigger: 'click'
    });
    var $relatedTable = $('#relatedTable');
    $(function(){
        //START 表格配置
        $relatedTable.bootstrapTable({
            columns: [


                {
                    title: '日期',
                    field: 'performanceDate',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    field: 'performanceStatus',
                    title: '状态',
                    align: 'center',
                    formatter:function (v,r){
                        switch (v) {
                            case 0:
                                return '<span class="badge badge-primary">待审批</span>';
                            case 1:
                                return '<span class="badge badge-warning-light">审批中</span>';
                            case 11:
                                return '<span class="badge badge-danger">退回</span>';
                            case 2:
                                return '<span class="badge badge-primary">待自评</span>';
                            case 3:
                                return '<span class="badge badge-warning-light">评分审批中</span>';
                            case 6:
                                return '<span class="badge badge-success">已结束</span>';
                            case 7:
                                return '<span class="badge badge-success">已归档</span>';
                        }
                    }
                },
                {
                    title: '数量',
                    field: 'flag',
                    align: 'center',
                    valign: 'middle'
                }
            ],
            onLoadSuccess : function(){

            }
        });

        $('.search-btn').on('click',function(){
            $relatedTable.bootstrapTable('refresh', { url:'${ctxPath}/sea/supply/report/getProduce.do?'+$('#search-form').serialize() });
        });
    });



    $(".export-btn").click(function () {
        window.location.href='/sea/supply/report/export.do?'+$('#search-form').serialize();
    });
</script>
</body>
</html>
